# Maintainer: Krystian Chachuła <krystian@krystianch.com>
pkgname=py3-qpageview
_pkgname=qpageview
pkgver=0.6.2
pkgrel=0
pkgdesc="Page-based viewer widget for PyQt5"
url="https://qpageview.org"
arch="noarch"
license="GPL-3.0-or-later"
depends="py3-qt5"
makedepends="py3-gpep517 py3-setuptools py3-wheel py3-sphinx"
subpackages="$pkgname-pyc $pkgname-doc"
source="$_pkgname-$pkgver.tar.gz::https://github.com/frescobaldi/qpageview/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # no tests

build() {
	gpep517 build-wheel \
		--wheel-dir dist \
		--output-fd 3 3>&1 >&2

	sphinx-build -b man docs/source/ docs/build/man/
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/*.whl

	install -m 644 -D docs/build/man/qpageview.1 \
		"$pkgdir"/usr/share/man/man1/qpageview.1
}

sha512sums="
80b1d6d4419594bcac195450ab030ab0b4fe3fe92dc9a6db598d1dd2282670f0d0b9d957b3c37313d7002f8f7dbc1bdd101edca81e5edca19c6e33ec4f6e4ffe  qpageview-0.6.2.tar.gz
"
